package cn.com.paycn.ken.service.impl;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import javax.annotation.Resource;

import org.apache.commons.collections.MapUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import cn.com.paycn.ken.dao.StaticParamDao;
import cn.com.paycn.ken.hbm.StaticParam;
import cn.com.paycn.ken.utils.ResourceUtils;

//@Service("staticParam")
public class StaticParamService
{
    public static class Agent
    {

        public static List getProfit()
        {
            return StaticParamService.getStaticParamList("agent_profit");
        }

        public static String getProfitValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("agent_profit", itemCode);
        }

        public static String getProfitNo()
        {
            return StaticParamService.getStaticParamCode("agent_profit", PROFIT_ARRAY[0]);
        }

        public static String getProfitYes()
        {
            return StaticParamService.getStaticParamCode("agent_profit", PROFIT_ARRAY[1]);
        }

        private static final String PROFIT = "agent_profit";
        private static final String PROFIT_ARRAY[] = {
            "\u4E0D\u5206\u6DA6", "\u5206\u6DA6"
        };


        public Agent()
        {
        }
    }

    public static class AgentBond
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        public static List getType()
        {
            return StaticParamService.getStaticParamList(TYPE);
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(TYPE, itemCode);
        }

        public static String getTypeFreeze()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[0]);
        }

        public static String getTypeUnFreeze()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[1]);
        }

        public static String getTypePay()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[2]);
        }

        public static String getTypeCollection()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[3]);
        }

        private static String STATUS = "Agentbond_status";
        private static String TYPE = "Agentbond_operatetype";
        private static String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548"
        };
        private static String TYPE_ARRAY[] = {
            "\u51BB\u7ED3", "\u89E3\u51BB", "\u652F\u4ED8", "\u6536\u6B3E"
        };


        public AgentBond()
        {
        }
    }

    public static class AgentMove
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("agentmove_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("agentmove_status", itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("agentmove_status", STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("agentmove_status", STATUS_ARRAY[1]);
        }

        private static final String STATUS = "agentmove_status";
        private static final String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548"
        };


        public AgentMove()
        {
        }
    }

    public static class AgentUpgrade
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("agentupgrade_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("agentupgrade_status", itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("agentupgrade_status", STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("agentupgrade_status", STATUS_ARRAY[1]);
        }

        private static final String STATUS = "agentupgrade_status";
        private static final String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548"
        };


        public AgentUpgrade()
        {
        }
    }

    public static class Allot
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getOperatorTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        private static String STATUS = "allot_status";
        private static String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548"
        };


        public Allot()
        {
        }
    }

    public static class DirectBranch
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusActive()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusLocked()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        public static List getInst()
        {
            return StaticParamService.getStaticParamList(INST);
        }

        public static String getInstValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(INST, itemCode);
        }

        public static String getInstUnionpay()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getInstBank()
        {
            return StaticParamService.getStaticParamCode(INST, INST_ARRAY[1]);
        }

        public static String getInstThirdparty()
        {
            return StaticParamService.getStaticParamCode(INST, INST_ARRAY[2]);
        }

        public static String getInstOther()
        {
            return StaticParamService.getStaticParamCode(INST, INST_ARRAY[3]);
        }

        public static List getMidmode()
        {
            return StaticParamService.getStaticParamList(MIDMODE);
        }

        public static String getMidModeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(MIDMODE, itemCode);
        }

        public static String getMidModeBigMid()
        {
            return StaticParamService.getStaticParamCode(MIDMODE, MIDMODE_ARRAY[0]);
        }

        public static String getMidModeOnly()
        {
            return StaticParamService.getStaticParamCode(MIDMODE, MIDMODE_ARRAY[1]);
        }

        public static List getRateFlag()
        {
            return StaticParamService.getStaticParamList(RATEFLAG);
        }

        public static String getRateFlagValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(RATEFLAG, itemCode);
        }

        public static String getRateFlagMCC()
        {
            return StaticParamService.getStaticParamCode(RATEFLAG, RATEFLAG_ARRAY[0]);
        }

        public static String getRateFlagDefined()
        {
            return StaticParamService.getStaticParamCode(RATEFLAG, RATEFLAG_ARRAY[1]);
        }

        private static String STATUS = "direct_branch_status";
        private static String INST = "direct_branch_inst";
        private static String MIDMODE = "direct_branch_midmode";
        private static String RATEFLAG = "direct_branch_rateflag";
        private static String STATUS_ARRAY[] = {
            "\u542F\u7528", "\u9501\u5B9A"
        };
        private static String INST_ARRAY[] = {
            "\u94F6\u8054", "\u94F6\u884C", "\u7B2C\u4E09\u65B9\u652F\u4ED8\u516C\u53F8", "\u5176\u4ED6\u652F\u4ED8\u516C\u53F8"
        };
        private static String MIDMODE_ARRAY[] = {
            "\u5355\u4E00\u5546\u6237\u53F7", "\u72EC\u7ACB\u7684\u94F6\u8054\u6216\u94F6\u884C\u5546\u6237\u53F7"
        };
        private static String RATEFLAG_ARRAY[] = {
            "\u94F6\u8054\u6807\u51C6\u8D39\u7387", "\u81EA\u5B9A\u4E49\u8D39\u7387"
        };


        public DirectBranch()
        {
        }
    }

    public static class EndBusiness
    {

        public static List getOwnerType()
        {
            return StaticParamService.getStaticParamList("endbuiness_ownertype");
        }

        public static String getOwnertypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("endbuiness_ownertype", itemCode);
        }

        public static String getOwnertypeMerchant()
        {
            return StaticParamService.getStaticParamCode("endbuiness_ownertype", OWNERTYPE_ARRAY[0]);
        }

        public static String getOwnertypeAgent()
        {
            return StaticParamService.getStaticParamCode("endbuiness_ownertype", OWNERTYPE_ARRAY[1]);
        }

        public static String getOwnerAgentMerchant()
        {
            return StaticParamService.getStaticParamCode("endbuiness_ownertype", OWNERTYPE_ARRAY[2]);
        }

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("endbuiness_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("endbuiness_status", itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("endbuiness_status", STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("endbuiness_status", STATUS_ARRAY[1]);
        }

        public static String getStatusShutDown()
        {
            return StaticParamService.getStaticParamCode("endbuiness_status", STATUS_ARRAY[2]);
        }

        private static final String OWNERTYPE = "endbuiness_ownertype";
        private static final String STATUS = "endbuiness_status";
        private static final String OWNERTYPE_ARRAY[] = {
            "\u5546\u6237", "\u4EE3\u7406\u5546", "\u4EE3\u7406\u5546\u5546\u6237"
        };
        private static final String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548", "\u5DF2\u5173\u95ED"
        };


        public EndBusiness()
        {
        }
    }

    public static class FaultTerminal
    {

        public static List getHandlerMethods()
        {
            return StaticParamService.getStaticParamList(HANDLERMETHOD);
        }

        public static String getHandlerMethodValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(HANDLERMETHOD, itemCode);
        }

        public static String getHandlerMethodChange()
        {
            return StaticParamService.getStaticParamCode(HANDLERMETHOD, HANDLERMETHOD_ARRAY[0]);
        }

        public static String getHandlerMethodFix()
        {
            return StaticParamService.getStaticParamCode(HANDLERMETHOD, HANDLERMETHOD_ARRAY[1]);
        }

        public static String getHandlerMethodOther()
        {
            return StaticParamService.getStaticParamCode(HANDLERMETHOD, HANDLERMETHOD_ARRAY[2]);
        }

        private static String HANDLERMETHOD = "handlermethod";
        private static String HANDLERMETHOD_ARRAY[] = {
            "\u7EC8\u7AEF\u66FF\u6362", "\u7EC8\u7AEF\u7EF4\u4FEE", "\u5176\u5B83"
        };


        public FaultTerminal()
        {
        }
    }

    public static class Freeze
    {

        public static List getOperatorType()
        {
            return StaticParamService.getStaticParamList("freeze_operatortype");
        }

        public static String getOperatorTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("freeze_operatortype", itemCode);
        }

        public static String getOperatorTypeFreeze()
        {
            return StaticParamService.getStaticParamCode("freeze_operatortype", OPERATOR_TYPE_ARRAY[0]);
        }

        public static String getOperatorTypeUnFreeze()
        {
            return StaticParamService.getStaticParamCode("freeze_operatortype", OPERATOR_TYPE_ARRAY[1]);
        }

        public static List getStatusList()
        {
            return StaticParamService.getStaticParamList("freeze_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("freeze_status", itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("freeze_status", STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("freeze_status", STATUS_ARRAY[1]);
        }

        public static String getStatusShutDown()
        {
            return StaticParamService.getStaticParamCode("freeze_status", STATUS_ARRAY[2]);
        }

        public static List getTypeList()
        {
            return StaticParamService.getStaticParamList("freeze_type");
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("freeze_type", itemCode);
        }

        public static String getTypeMerchant()
        {
            return StaticParamService.getStaticParamCode("freeze_type", TYPE_ARRAY[0]);
        }

        public static String getTypeMember()
        {
            return StaticParamService.getStaticParamCode("freeze_type", TYPE_ARRAY[1]);
        }

        private static final String OPERATOR_TYPE = "freeze_operatortype";
        private static final String STATUS = "freeze_status";
        private static final String TYPE = "freeze_type";
        private static final String OPERATOR_TYPE_ARRAY[] = {
            "\u51BB\u7ED3", "\u89E3\u51BB"
        };
        private static final String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548", "\u5DF2\u5173\u95ED"
        };
        private static final String TYPE_ARRAY[] = {
            "\u5546\u6237", "\u7528\u6237"
        };


        public Freeze()
        {
        }
    }

    public static class FreezeAmt
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getOperatorTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusFreeze()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusUnfreeze()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        private static String STATUS = "freezeamt_status";
        private static String STATUS_ARRAY[] = {
            "\u51BB\u7ED3", "\u89E3\u51BB"
        };


        public FreezeAmt()
        {
        }
    }

    public static class IncreasePosContract
    {

        public static List getContractStatus()
        {
            return StaticParamService.getStaticParamList("increaesposcontract_status");
        }

        private static String getStatusValue(String paramCode)
        {
            return StaticParamService.getStaticParamValue("increaesposcontract_status", paramCode);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("increaesposcontract_status", STATUS_ARRAY[0]);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("increaesposcontract_status", STATUS_ARRAY[1]);
        }

        public static String getStatusShutDown()
        {
            return StaticParamService.getStaticParamCode("increaesposcontract_status", STATUS_ARRAY[2]);
        }

        public static List getOwnerType()
        {
            return StaticParamService.getStaticParamList("increaesposcontract_owner");
        }

        public static String getOwnerTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("increaesposcontract_owner", itemCode);
        }

        public static String getOwnerAgent()
        {
            return StaticParamService.getStaticParamCode("increaesposcontract_owner", OWNER_ARRAY[0]);
        }

        public static String getOwnerMerchant()
        {
            return StaticParamService.getStaticParamCode("increaesposcontract_owner", OWNER_ARRAY[1]);
        }

        public static String getOwnerAgentMerchant()
        {
            return StaticParamService.getStaticParamCode("increaesposcontract_owner", OWNER_ARRAY[2]);
        }

        private static final String STATUS = "increaesposcontract_status";
        private static final String OWNER = "increaesposcontract_owner";
        private static final String STATUS_ARRAY[] = {
            "\u5DF2\u751F\u6548", "\u672A\u751F\u6548", "\u5DF2\u5173\u95ED"
        };
        private static final String OWNER_ARRAY[] = {
            "\u4EE3\u7406\u5546", "\u5546\u6237", "\u4EE3\u7406\u5546\u5546\u6237"
        };


        public IncreasePosContract()
        {
        }
    }

    public static class Journal
    {

        public static List getType()
        {
            return StaticParamService.getStaticParamList(TYPE);
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(TYPE, itemCode);
        }

        public static String getTypeDirectBranch()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[0]);
        }

        public static String getTypeDirectBranchRate()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[1]);
        }

        public static String getUnit()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[2]);
        }

        public static String getTypeMerchant()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[3]);
        }

        public static String getTypeMerchantRate()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[4]);
        }

        public static String getTypeAgent()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[5]);
        }

        public static String getTypeAgentRate()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[6]);
        }

        public static String getTypeAgentMerchant()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[7]);
        }

        public static String getTypeAgentMerchantRate()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[8]);
        }

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        public static String getStatusShutdown()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[2]);
        }

        private static String TYPE = "journal_type";
        private static String STATUS = "journal_status";
        private static String TYPE_ARRAY[] = {
            "\u76F4\u8FDE\u673A\u6784", "\u76F4\u8FDE\u673A\u6784\u8D39\u7387", "\u673A\u6784", "\u76F4\u8425\u5546\u6237", "\u76F4\u8425\u5546\u6237\u8D39\u7387", "\u4EE3\u7406\u5546", "\u4EE3\u7406\u5546\u8D39\u7387", "\u4EE3\u7406\u5546\u5546\u6237", "\u4EE3\u7406\u5546\u5546\u6237\u8D39\u7387"
        };
        private static String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548", "\u5DF2\u5173\u95ED"
        };


        public Journal()
        {
        }
    }

    public static class LoginLog
    {

        public static List getType()
        {
            return StaticParamService.getStaticParamList("loginlog_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("loginlog_status", itemCode);
        }

        public static String getStatusSuccesss()
        {
            return StaticParamService.getStaticParamCode("loginlog_status", STATUS_ARRAY[0]);
        }

        public static String getStatusError()
        {
            return StaticParamService.getStaticParamCode("loginlog_status", STATUS_ARRAY[1]);
        }

        private static final String STATUS = "loginlog_status";
        private static final String STATUS_ARRAY[] = {
            "\u767B\u9646\u6210\u529F", "\u767B\u9646\u5931\u8D25"
        };


        public LoginLog()
        {
        }
    }

    public static class MaterielPurchase
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        public static List getType()
        {
            return StaticParamService.getStaticParamList(TYPE);
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(TYPE, itemCode);
        }

        public static String getTypeNetwork()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[0]);
        }

        public static String getTypePaper()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[1]);
        }

        public static String getTypeProcess()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[2]);
        }

        private static String TYPE = "materielpurchase_type";
        private static String STATUS = "materielpurchase_status";
        private static String TYPE_ARRAY[] = {
            "\u5165\u7F51\u670D\u52A1\u8D39", "\u6253\u5370\u5377\u7EB8", "\u7528\u6237\u534F\u8BAE"
        };
        private static String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548"
        };


        public MaterielPurchase()
        {
        }
    }

    public static class Member
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("member_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("member_status", itemCode);
        }

        public static String getStatusLock()
        {
            return StaticParamService.getStaticParamCode("member_status", STATUS_ARRAY[0]);
        }

        public static String getStatusActive()
        {
            return StaticParamService.getStaticParamCode("member_status", STATUS_ARRAY[1]);
        }

        public static String getStatusDelete()
        {
            return StaticParamService.getStaticParamCode("member_status", STATUS_ARRAY[2]);
        }

        public static List getType()
        {
            return StaticParamService.getStaticParamList("member_type");
        }

        public static String getTypeoValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("member_type", itemCode);
        }

        public static String getTypeCustomer()
        {
            return StaticParamService.getStaticParamCode("member_type", TYPE_ARRAY[0]);
        }

        private static final String STATUS = "member_status";
        private static final String TYPE = "member_type";
        private static final String STATUS_ARRAY[] = {
            "\u5DF2\u9501\u5B9A", "\u5DF2\u6FC0\u6D3B", "\u5DF2\u5220\u9664"
        };
        private static final String TYPE_ARRAY[] = {
            "\u5BA2\u6237\u7ECF\u7406"
        };


        public Member()
        {
        }
    }

    public static class Merchant
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemValue)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemValue);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        public static String getStatusLock()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[2]);
        }

        public static String getStatusExit()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[3]);
        }

        public static String getStatusShutdown()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[4]);
        }

        public static List getOwntype()
        {
            return StaticParamService.getStaticParamList(OWNTYPE);
        }

        public static String getOwntypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(OWNTYPE, itemCode);
        }

        public static String getOwntypeCause()
        {
            return StaticParamService.getStaticParamCode(OWNTYPE, OWNTYPE_ARRAY[0]);
        }

        public static String getOwntypeEnterprise()
        {
            return StaticParamService.getStaticParamCode(OWNTYPE, OWNTYPE_ARRAY[1]);
        }

        public static String getOwntypeIndividuality()
        {
            return StaticParamService.getStaticParamCode(OWNTYPE, OWNTYPE_ARRAY[2]);
        }

        public static List getType()
        {
            return StaticParamService.getStaticParamList(TYPE);
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(TYPE, itemCode);
        }

        public static String getTypeMerchant()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[0]);
        }

        public static String getTypeAgentMerchant()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[1]);
        }

        public static List getManageryear()
        {
            return StaticParamService.getStaticParamList(MANAGERYEAR);
        }

        public static String getManageryearValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(MANAGERYEAR, itemCode);
        }

        public static String getManageryearLessSixMonth()
        {
            return StaticParamService.getStaticParamCode(MANAGERYEAR, MANAGERYEAR_ARRAY[0]);
        }

        public static String getManageryearSixMonthsToFiveYears()
        {
            return StaticParamService.getStaticParamCode(MANAGERYEAR, MANAGERYEAR_ARRAY[1]);
        }

        public static String getManageryearMoreThanFiveYears()
        {
            return StaticParamService.getStaticParamCode(MANAGERYEAR, MANAGERYEAR_ARRAY[2]);
        }

        public static List getNature()
        {
            return StaticParamService.getStaticParamList(NATURE);
        }

        public static String getNatureValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(NATURE, itemCode);
        }

        public static String getNatureIndividuality()
        {
            return StaticParamService.getStaticParamCode(NATURE, NATURE_ARRAY[0]);
        }

        public static String getNatureOther()
        {
            return StaticParamService.getStaticParamCode(NATURE, NATURE_ARRAY[1]);
        }

        public static String getNatureCountry()
        {
            return StaticParamService.getStaticParamCode(NATURE, NATURE_ARRAY[2]);
        }

        public static List getPlace()
        {
            return StaticParamService.getStaticParamList(PLACE);
        }

        public static String getPlaceValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(PLACE, itemCode);
        }

        public static String getPlaceLease()
        {
            return StaticParamService.getStaticParamCode(PLACE, PLACE_ARRAY[0]);
        }

        public static String getPlaceOwner()
        {
            return StaticParamService.getStaticParamCode(PLACE, PLACE_ARRAY[1]);
        }

        public static List getIdentityType()
        {
            return StaticParamService.getStaticParamList(IDENTITY);
        }

        public static String getIdentityTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(IDENTITY, itemCode);
        }

        public static String getIdentityLandmass()
        {
            return StaticParamService.getStaticParamCode(IDENTITY, IDENTITY_ARRAY[0]);
        }

        public static String getIdentityOther()
        {
            return StaticParamService.getStaticParamCode(IDENTITY, IDENTITY_ARRAY[1]);
        }

        public static List getAccType()
        {
            return StaticParamService.getStaticParamList(ACCTYPE);
        }

        public static String getAccTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(ACCTYPE, itemCode);
        }

        public static String getAccTypeToPublic()
        {
            return StaticParamService.getStaticParamCode(ACCTYPE, ACCTYPE_ARRAY[0]);
        }

        public static String getAccTypeToPerson()
        {
            return StaticParamService.getStaticParamCode(ACCTYPE, ACCTYPE_ARRAY[1]);
        }

        private static String STATUS = "merchant_status";
        private static String OWNTYPE = "merchant_owntype";
        private static String TYPE = "merchant_type";
        private static String MANAGERYEAR = "merchant_manageryear";
        private static String NATURE = "merchant_nature";
        private static String PLACE = "merchant_place";
        private static String IDENTITY = "merchant_identitytype";
        private static String ACCTYPE = "merchant_acctype";
        private static String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548", "\u5DF2\u9501\u5B9A", "\u5DF2\u9000\u573A", "\u5DF2\u5173\u95ED"
        };
        private static String OWNTYPE_ARRAY[] = {
            "\u4E8B\u4E1A\u5355\u4F4D", "\u4F01\u4E1A\u5355\u4F4D", "\u4E2A\u4F53\u5DE5\u5546\u6237"
        };
        private static String TYPE_ARRAY[] = {
            "\u76F4\u8425\u5546\u6237", "\u4EE3\u7406\u5546\u5546\u6237"
        };
        private static String MANAGERYEAR_ARRAY[] = {
            "6\u4E2A\u6708\u4EE5\u4E0B", "6\u4E2A\u6708\u52305\u5E74", "5\u5E74\u4EE5\u4E0A"
        };
        private static String NATURE_ARRAY[] = {
            "\u4E2A\u4F53\u5DE5\u5546\u6237", "\u5176\u5B83\u6027\u8D28", "\u56FD\u8425\u4F01\u4E1A"
        };
        private static String PLACE_ARRAY[] = {
            "\u79DF\u8D41\u623F", "\u81EA\u4F4F\u623F\u5C4B"
        };
        private static String IDENTITY_ARRAY[] = {
            "\u5927\u9646", "\u5176\u5B83"
        };
        private static String ACCTYPE_ARRAY[] = {
            "\u5BF9\u516C", "\u5BF9\u79C1"
        };


        public Merchant()
        {
        }
    }

    public static class Organization
    {

        public static List getType()
        {
            return StaticParamService.getStaticParamList(TYPE);
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(TYPE, itemCode);
        }

        public static String getTypeDepartment()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[0]);
        }

        public static String getTypeUnit()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[1]);
        }

        public static String getTypeAgent()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[2]);
        }

        private static String TYPE = "organization_type";
        private static String TYPE_ARRAY[] = {
            "\u673A\u6784\u90E8\u95E8", "\u673A\u6784", "\u4EE3\u7406\u5546"
        };


        public Organization()
        {
        }
    }

    public static class PurchaseContract
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        private static String STATUS = "purchasecontract_status";
        private static String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548"
        };


        public PurchaseContract()
        {
        }
    }

    public static class RateRule
    {

        public static List getTypes()
        {
            return StaticParamService.getStaticParamList(TYPE);
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(TYPE, itemCode);
        }

        public static String getTypeSingle()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[0]);
        }

        public static String getTypeSingle_Rate_NoMaxMin()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[1]);
        }

        public static String getTypeRate_NoMaxMin()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[2]);
        }

        public static String getTypeSingle_Rate_MaxMin()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[3]);
        }

        public static String getTypeRate_MaxMin()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[4]);
        }

        public static String getTypefloat()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[5]);
        }

        public static String getTypeSpecial()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[6]);
        }

        private static String TYPE = "raterule_type";
        private static String TYPE_ARRAY[] = {
            "\u5355\u7B14\u56FA\u5B9A", "\u5355\u7B14\u56FA\u5B9A,\u6BD4\u4F8B\u6536\u53D6,\u4E0D\u8BBE\u7F6E\u5C01\u9876\u4FDD\u5E95", "\u6BD4\u4F8B\u6536\u53D6,\u4E0D\u8BBE\u7F6E\u5C01\u9876\u4FDD\u5E95", "\u5355\u7B14\u56FA\u5B9A,\u6BD4\u4F8B\u6536\u53D6,\u8BBE\u7F6E\u5C01\u9876\u4FDD\u5E95", "\u6BD4\u4F8B\u6536\u53D6,\u8BBE\u7F6E\u5C01\u9876\u4FDD\u5E95", "\u6D6E\u52A8\u8D39\u7387", "\u7279\u522B\u5904\u7406"
        };


        public RateRule()
        {
        }
    }

    public static class Refund
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("refund_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("refund_status", itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("refund_status", STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("refund_status", STATUS_ARRAY[1]);
        }

        public static String getStatusExit()
        {
            return StaticParamService.getStaticParamCode("refund_status", STATUS_ARRAY[2]);
        }

        private static final String STATUS = "refund_status";
        private static final String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548", "\u5DF2\u5173\u95ED"
        };


        public Refund()
        {
        }
    }

    public static class RetrievePosContract
    {

        public static List getContractStatus()
        {
            return StaticParamService.getStaticParamList("retrieveposcontract_status");
        }

        private static String getStatusValue(String paramCode)
        {
            return StaticParamService.getStaticParamValue("retrieveposcontract_status", paramCode);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("retrieveposcontract_status", STATUS_ARRAY[0]);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("retrieveposcontract_status", STATUS_ARRAY[1]);
        }

        public static String getStatusShutDown()
        {
            return StaticParamService.getStaticParamCode("retrieveposcontract_status", STATUS_ARRAY[2]);
        }

        public static List getOwnerType()
        {
            return StaticParamService.getStaticParamList("retrieveposcontract_owner");
        }

        public static String getOwnerTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("retrieveposcontract_owner", itemCode);
        }

        public static String getOwnerAgent()
        {
            return StaticParamService.getStaticParamCode("retrieveposcontract_owner", OWNER_ARRAY[0]);
        }

        public static String getOwnerMerchant()
        {
            return StaticParamService.getStaticParamCode("retrieveposcontract_owner", OWNER_ARRAY[1]);
        }

        public static String getOwnerAgentMerchant()
        {
            return StaticParamService.getStaticParamCode("retrieveposcontract_owner", OWNER_ARRAY[2]);
        }

        private static final String STATUS = "retrieveposcontract_status";
        private static final String OWNER = "retrieveposcontract_owner";
        private static final String STATUS_ARRAY[] = {
            "\u5DF2\u751F\u6548", "\u672A\u751F\u6548", "\u5DF2\u5173\u95ED"
        };
        private static final String OWNER_ARRAY[] = {
            "\u4EE3\u7406\u5546", "\u5546\u6237", "\u4EE3\u7406\u5546\u5546\u6237"
        };


        public RetrievePosContract()
        {
        }
    }

    public static class Role
    {

        public static List getType()
        {
            return StaticParamService.getStaticParamList("role_type");
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("role_type", itemCode);
        }

        public static String getTypeUnit()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[0]);
        }

        public static String getTypeAgent()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[1]);
        }

        public static String getTypeMerchant()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[2]);
        }

        public static String getTypeCustomer()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[3]);
        }

        public static String getTypeSeniorManager()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[4]);
        }

        public static String getTypeDepartmentManager()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[5]);
        }

        public static String getTypeBusinessHandler()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[6]);
        }

        public static String getTypeRiskManager()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[7]);
        }

        public static String getTypeFinance()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[8]);
        }

        public static String getTypeCustomerServ()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[9]);
        }

        public static String getTypeCustomerManager()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[10]);
        }

        public static String getTypeStoreroomManager()
        {
            return StaticParamService.getStaticParamCode("role_type", TYPE_ARRAY[11]);
        }

        private static final String TYPE = "role_type";
        private static final String TYPE_ARRAY[] = {
            "\u8FD0\u8425\u7BA1\u7406\u7CFB\u7EDF", "POS\u7BA1\u7406\u7CFB\u7EDF", "\u5546\u6237\u670D\u52A1\u7CFB\u7EDF", "\u5BA2\u6237\u7ECF\u7406\u7CFB\u7EDF", "\u9AD8\u7EA7\u7BA1\u7406", "\u90E8\u95E8\u7ECF\u7406", "\u4E1A\u52A1\u7ECF\u529E", "\u98CE\u63A7\u7BA1\u7406", "\u8D22\u52A1", "\u5BA2\u6237\u670D\u52A1", 
            "\u5BA2\u6237\u7ECF\u7406", "\u5BA2\u623F\u7BA1\u7406"
        };


        public Role()
        {
        }
    }

    public static class SimWarehouseDetail
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusIn()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusOut()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        private static String STATUS = "simwarehousedetail_status";
        private static String STATUS_ARRAY[] = {
            "\u5165\u5E93", "\u51FA\u5E93"
        };


        public SimWarehouseDetail()
        {
        }
    }

    public static class StandInsideLetter
    {

        public static List getHavetosee()
        {
            return StaticParamService.getStaticParamList(HAVETOSEE);
        }

        public static String getHavetoseeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(HAVETOSEE, itemCode);
        }

        public static String getHavetoseeUnRead()
        {
            return StaticParamService.getStaticParamCode(HAVETOSEE, HAVETOSEE_ARRAY[0]);
        }

        public static String getHavetoseeBeenRead()
        {
            return StaticParamService.getStaticParamCode(HAVETOSEE, HAVETOSEE_ARRAY[1]);
        }

        public static String getHavetoseeAll()
        {
            return StaticParamService.getStaticParamCode(HAVETOSEE, HAVETOSEE_ARRAY[2]);
        }

        private static String HAVETOSEE = "standinsideletter_status";
        private static String HAVETOSEE_ARRAY[] = {
            "\u672A\u770B", "\u5DF2\u770B", "\u5168\u4F53\u53D1\u9001"
        };


        public StandInsideLetter()
        {
        }
    }

    public static class StatementFile
    {

        public static List getStatus()
        {
            return StaticParamService.getMapParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusLocked()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        private static String STATUS = "statementfile_status";
        private static String STATUS_ARRAY[] = {
            "\u9501\u5B9A"
        };


        public StatementFile()
        {
        }
    }

    public static class Terminal
    {

        public static List getSrc()
        {
            return StaticParamService.getStaticParamList("terminal_src");
        }

        public static String getSrcValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("terminal_src", itemCode);
        }

        public static String getSrcFactory()
        {
            return StaticParamService.getStaticParamCode("terminal_src", SRC_ARRAY[0]);
        }

        public static String getSrcFault()
        {
            return StaticParamService.getStaticParamCode("terminal_src", SRC_ARRAY[1]);
        }

        private static final String SRC = "terminal_src";
        private static final String SRC_ARRAY[] = {
            "\u5382\u5546\u53D1\u8D27", "\u6545\u969C\u673A\u53D1\u8D27"
        };


        public Terminal()
        {
        }
    }

    public static class TerminalBindLog
    {

        public static List getType()
        {
            return StaticParamService.getStaticParamList("terminalbindlog_type");
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("terminalbindlog_type", itemCode);
        }

        public static String getTypeBind()
        {
            return StaticParamService.getStaticParamCode("terminalbindlog_type", TYPE_ARRAY[0]);
        }

        public static String getTypeUnBind()
        {
            return StaticParamService.getStaticParamCode("terminalbindlog_type", TYPE_ARRAY[1]);
        }

        private static final String TYPE = "terminalbindlog_type";
        private static final String TYPE_ARRAY[] = {
            "\u7ED1\u5B9A", "\u89E3\u7ED1"
        };


        public TerminalBindLog()
        {
        }
    }

    public static class TerminalFault
    {

        public static List getReasonType()
        {
            return StaticParamService.getStaticParamList("terminalfault_reasontype");
        }

        public static String getReasonTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("terminalfault_reasontype", itemCode);
        }

        public static String getReasonTypeOtherFault()
        {
            return StaticParamService.getStaticParamCode("terminalfault_reasontype", REASONTYPE_ARRAY[0]);
        }

        public static String getReasonTypeParameterFault()
        {
            return StaticParamService.getStaticParamCode("terminalfault_reasontype", REASONTYPE_ARRAY[1]);
        }

        public static String getReasonTypePartsFault()
        {
            return StaticParamService.getStaticParamCode("terminalfault_reasontype", REASONTYPE_ARRAY[2]);
        }

        public static String getReasonTypeRemoteFault()
        {
            return StaticParamService.getStaticParamCode("terminalfault_reasontype", REASONTYPE_ARRAY[3]);
        }

        public static List getOwnerType()
        {
            return StaticParamService.getStaticParamList("terminalfault_ownertype");
        }

        public static String getOwnerTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("terminalfault_ownertype", itemCode);
        }

        public static String getOwnerTypeMerchant()
        {
            return StaticParamService.getStaticParamCode("terminalfault_ownertype", OWNERTYPE_ARRAY[0]);
        }

        public static String getOwnerTypeAgent()
        {
            return StaticParamService.getStaticParamCode("terminalfault_ownertype", OWNERTYPE_ARRAY[1]);
        }

        public static String getOwnerTypeAgentMerchant()
        {
            return StaticParamService.getStaticParamCode("terminalfault_ownertype", OWNERTYPE_ARRAY[2]);
        }

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("terminalfault_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("terminalfault_status", itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("terminalfault_status", STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("terminalfault_status", STATUS_ARRAY[1]);
        }

        public static String getStatusShutDown()
        {
            return StaticParamService.getStaticParamCode("terminalfault_status", STATUS_ARRAY[2]);
        }

        private static final String REASONTYPE = "terminalfault_reasontype";
        private static final String OWNERTYPE = "terminalfault_ownertype";
        private static final String STATUS = "terminalfault_status";
        private static final String REASONTYPE_ARRAY[] = {
            "\u5176\u5B83", "\u53C2\u6570\u9519\u8BEF", "\u7EC8\u7AEF\u914D\u4EF6\u635F\u574F", "\u65E0\u6CD5\u8FDC\u7A0B\u63A7\u5236"
        };
        private static final String OWNERTYPE_ARRAY[] = {
            "\u5546\u6237", "\u4EE3\u7406\u5546", "\u4EE3\u7406\u5546\u5546\u6237"
        };
        private static final String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548", "\u5DF2\u5173\u95ED"
        };


        public TerminalFault()
        {
        }
    }

    public static class TerminalHistory
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusIn()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusOut()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        public static List getOperateType()
        {
            return StaticParamService.getStaticParamList(OPERATETYPE);
        }

        public static String getOperateTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(OPERATETYPE, itemCode);
        }

        public static String getOperateTypeFactoryToUnit()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[0]);
        }

        public static String getOperateTypeUnitToUnit()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[1]);
        }

        public static String getOperateTypeUnitToMerchant()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[2]);
        }

        public static String getOperateTypeUnitToAgent()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[3]);
        }

        public static String getOperateTypeAgentToAgentMerchant()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[4]);
        }

        public static String getOperateTypeUnitReturnFactory()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[5]);
        }

        public static String getOperateTypeMerchantReturnUnit()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[6]);
        }

        public static String getOperateTypeAgentReturnUnit()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[7]);
        }

        public static String getOperateTypeAgentMerchantReturnAgent()
        {
            return StaticParamService.getStaticParamCode(OPERATETYPE, OPERATETYPE_ARRAY[8]);
        }

        private static String STATUS = "terminalhistory_status";
        private static String OPERATETYPE = "terminalhistory_operatetype";
        private static String STATUS_ARRAY[] = {
            "\u5165\u5E93", "\u51FA\u5E93"
        };
        private static String OPERATETYPE_ARRAY[] = {
            "\u5382\u5546\u5230\u673A\u6784", "\u673A\u6784\u5230\u673A\u6784", "\u673A\u6784\u5230\u76F4\u8425\u5546\u6237", "\u673A\u6784\u5230\u4EE3\u7406\u5546", "\u4EE3\u7406\u5546\u5230\u4EE3\u7406\u5546\u5546\u6237", "\u673A\u6784\u9000\u8FD8\u7ED9\u5382\u5546", "\u76F4\u8425\u5546\u6237\u9000\u8FD8\u7ED9\u673A\u6784", "\u4EE3\u7406\u5546\u9000\u8FD8\u7ED9\u673A\u6784", "\u4EE3\u7406\u5546\u5546\u6237\u9000\u8FD8\u7ED9\u4EE3\u7406\u5546"
        };


        public TerminalHistory()
        {
        }
    }

    public static class TerminalWarehouse
    {

        public static List getSrc()
        {
            return StaticParamService.getStaticParamList("terminalwarehouse_src");
        }

        public static String getSrcValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("terminalwarehouse_src", itemCode);
        }

        public static String getSrcIncrease()
        {
            return StaticParamService.getStaticParamCode("terminalwarehouse_src", SRC_ARRAY[0]);
        }

        public static String getSrcExist()
        {
            return StaticParamService.getStaticParamCode("terminalwarehouse_src", SRC_ARRAY[1]);
        }

        public static String getSrcSampleMachine()
        {
            return StaticParamService.getStaticParamCode("terminalwarehouse_src", SRC_ARRAY[2]);
        }

        private static final String SRC = "terminalwarehouse_src";
        private static final String SRC_ARRAY[] = {
            "\u589E\u91CF", "\u5B58\u91CF", "\u6837\u54C1\u673A"
        };


        public TerminalWarehouse()
        {
        }
    }

    public static class TerminalWarehouseDetail
    {

        public static List getOwnerType()
        {
            return StaticParamService.getStaticParamList("terminalwarehousedetail_ownertype");
        }

        public static String getOwnerTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("terminalwarehousedetail_ownertype", itemCode);
        }

        public static String getOwnerTypeUnit()
        {
            return StaticParamService.getStaticParamCode("terminalwarehousedetail_ownertype", OWNERTYPE_ARRAY[0]);
        }

        public static String getOwnerTypeAgent()
        {
            return StaticParamService.getStaticParamCode("terminalwarehousedetail_ownertype", OWNERTYPE_ARRAY[1]);
        }

        public static String getOwnerTypeMerchant()
        {
            return StaticParamService.getStaticParamCode("terminalwarehousedetail_ownertype", OWNERTYPE_ARRAY[2]);
        }

        public static String getOwnerTypeAgentMerchant()
        {
            return StaticParamService.getStaticParamCode("terminalwarehousedetail_ownertype", OWNERTYPE_ARRAY[3]);
        }

        private static final String OWNERTYPE = "terminalwarehousedetail_ownertype";
        private static final String OWNERTYPE_ARRAY[] = {
            "\u673A\u6784", "\u4EE3\u7406\u5546", "\u76F4\u8425\u5546\u6237", "\u4EE3\u7406\u5546\u5546\u6237"
        };


        public TerminalWarehouseDetail()
        {
        }
    }

    public static class UnderlingUpgrade
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("underlingupgrade_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("underlingupgrade_status", itemCode);
        }

        public static String getStatusInvalid()
        {
            return StaticParamService.getStaticParamCode("underlingupgrade_status", STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode("underlingupgrade_status", STATUS_ARRAY[1]);
        }

        private static final String STATUS = "underlingupgrade_status";
        private static final String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548"
        };


        public UnderlingUpgrade()
        {
        }
    }

    public static class Unit
    {

        public static List getLevel()
        {
            return StaticParamService.getStaticParamList(LEVEL);
        }

        public static String getLevelValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(LEVEL, itemCode);
        }

        public static String getLevelNation()
        {
            return StaticParamService.getStaticParamCode(LEVEL, LEVEL_ARRAY[0]);
        }

        public static String getLevelProvince()
        {
            return StaticParamService.getStaticParamCode(LEVEL, LEVEL_ARRAY[1]);
        }

        public static String getLevelCity()
        {
            return StaticParamService.getStaticParamCode(LEVEL, LEVEL_ARRAY[2]);
        }

        public static String getLevelArea()
        {
            return StaticParamService.getStaticParamCode(LEVEL, LEVEL_ARRAY[3]);
        }

        public static String getLevelCountry()
        {
            return StaticParamService.getStaticParamCode(LEVEL, LEVEL_ARRAY[4]);
        }

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList(STATUS);
        }

        public static String getStatausValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(STATUS, itemCode);
        }

        public static String getStatusInvaid()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[0]);
        }

        public static String getStatusEffect()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[1]);
        }

        public static String getStatusExit()
        {
            return StaticParamService.getStaticParamCode(STATUS, STATUS_ARRAY[2]);
        }

        public static List getType()
        {
            return StaticParamService.getStaticParamList(TYPE);
        }

        public static String getTypeValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(TYPE, itemCode);
        }

        public static String getTypeUnit()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[0]);
        }

        public static String getTypeAgent()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[1]);
        }

        public static List getModel()
        {
            return StaticParamService.getStaticParamList(MODEL);
        }

        public static String getModelValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue(MODEL, itemCode);
        }

        public static String getTypeFranchisee()
        {
            return StaticParamService.getStaticParamCode(MODEL, MODEL_ARRAY[0]);
        }

        public static String getTypeOutsource()
        {
            return StaticParamService.getStaticParamCode(MODEL, MODEL_ARRAY[1]);
        }

        public static String getTypeNormalUnit()
        {
            return StaticParamService.getStaticParamCode(TYPE, TYPE_ARRAY[2]);
        }

        private static String LEVEL = "unit_level";
        private static String STATUS = "unit_status";
        private static String TYPE = "unit_type";
        private static String MODEL = "unit_model";
        private static String LEVEL_ARRAY[] = {
            "\u5168\u56FD\u7EA7", "\u7701", "\u5E02", "\u533A", "\u53BF"
        };
        private static String STATUS_ARRAY[] = {
            "\u672A\u751F\u6548", "\u5DF2\u751F\u6548", "\u5DF2\u5173\u95ED"
        };
        private static String TYPE_ARRAY[] = {
            "\u673A\u6784", "\u4EE3\u7406\u5546"
        };
        private static String MODEL_ARRAY[] = {
            "\u4EE3\u7406\u5546", "\u5916\u5305\u5546", "\u666E\u901A\u673A\u6784"
        };


        public Unit()
        {
        }
    }

    public static class WorkflowHistory
    {

        public static List getStatus()
        {
            return StaticParamService.getStaticParamList("workflowhistory_status");
        }

        public static String getStatusValue(String itemCode)
        {
            return StaticParamService.getStaticParamValue("workflowhistory_status", itemCode);
        }

        public static String getStatusStart()
        {
            return StaticParamService.getStaticParamCode("workflowhistory_status", STATUS_ARRAY[0]);
        }

        public static String getStatusComplete()
        {
            return StaticParamService.getStaticParamCode("workflowhistory_status", STATUS_ARRAY[1]);
        }

        public static String getStatusReject()
        {
            return StaticParamService.getStaticParamCode("workflowhistory_status", STATUS_ARRAY[2]);
        }

        public static String getStatusEnd()
        {
            return StaticParamService.getStaticParamCode("workflowhistory_status", STATUS_ARRAY[3]);
        }

        private static final String STATUS = "workflowhistory_status";
        private static final String STATUS_ARRAY[] = {
            "\u5DF2\u5F00\u59CB", "\u5DF2\u5B8C\u6210", "\u5DF2\u9A73\u56DE", "\u5DF2\u7EC8\u6B62"
        };


        public WorkflowHistory()
        {
        }
    }


    public StaticParamService()
    {
    }

    private static List getStaticParamList(String paramId)
    {
        if(!ResourceUtils.USE_REDIS)
        {
            if(MapUtils.isEmpty(paramMap))
                saveDataToMap();
            return getMapParamList(paramId);
        }
        HashOperations hashOperation = templete.opsForHash();
        Set keySet = hashOperation.keys(paramId);
        if(keySet == null || keySet.size() <= 0)
            saveDataToTemplete();
        keySet = hashOperation.keys(paramId);
        List staticParamList = new ArrayList();
        StaticParam staticParam;
        for(Iterator iter = keySet.iterator(); iter.hasNext(); staticParamList.add(staticParam))
        {
            String tempItemCode = iter.next().toString();
            String tempItemValue = hashOperation.get(paramId, tempItemCode).toString();
            staticParam = new StaticParam();
            staticParam.setItemCode(tempItemCode);
            staticParam.setItemValue(tempItemValue);
        }

        return staticParamList;
    }

    private static String getStaticParamCode(String paramId, String itemValue)
    {
        if(!ResourceUtils.USE_REDIS)
        {
            if(MapUtils.isEmpty(paramMap))
                saveDataToMap();
            return getMapParamCode(paramId, itemValue);
        }
        HashOperations hashOperation = templete.opsForHash();
        Set keySet = hashOperation.keys(paramId);
        if(keySet == null || keySet.size() <= 0)
            saveDataToTemplete();
        keySet = hashOperation.keys(paramId);
        for(Iterator iter = keySet.iterator(); iter.hasNext();)
        {
            String tempItemCode = iter.next().toString();
            String tempItemValue = hashOperation.get(paramId, tempItemCode).toString();
            if(tempItemValue.equals(itemValue))
                return tempItemCode;
        }

        return "";
    }

    private static String getStaticParamValue(String paramId, String itemCode)
    {
        if(!ResourceUtils.USE_REDIS)
        {
            if(MapUtils.isEmpty(paramMap))
                saveDataToMap();
            return getMapParamValue(paramId, itemCode);
        } else
        {
            HashOperations hashOperation = templete.opsForHash();
            return (String)hashOperation.get(paramId, itemCode);
        }
    }

    private static synchronized void saveDataToTemplete()
    {
 
//        Object execute = templete.execute(new RedisCallback() {
//
//            public HashOperations doInRedis(RedisConnection connection) throws DataAccessException
//            {
//                HashOperations paramHashOperation = StaticParamService.templete.opsForHash();
//                List list = StaticParamService.staticParamDao.getStaticParam();
//                for(int i = 0; i < list.size(); i++)
//                {
//                    StaticParam staticParam = (StaticParam)list.get(i);
//                    StaticParamService.templete.expire(staticParam.getParamId(), 5L, TimeUnit.MINUTES);
//                    paramHashOperation.put(staticParam.getParamId(), staticParam.getItemCode(), staticParam.getItemValue());
//                }
//
//                return null;
//            }
//
//            public volatile Object doInRedis(RedisConnection redisconnection)
//                throws DataAccessException
//            {
//                return doInRedis(redisconnection);
//            }
//
//        }
//);
    }

    private static synchronized void saveDataToMap()
    {
        List list = staticParamDao.find("select distinct p.paramId from StaticParam p");
        for(int i = 0; i < list.size(); i++)
        {
            String paramId = list.get(i).toString();
            List paramList = staticParamDao.find("from StaticParam p where p.paramId = ?", new Object[] {
                paramId
            });
            paramMap.put(paramId, paramList);
        }

    }

    private static List getMapParamList(String paramId)
    {
        return (List)paramMap.get(paramId);
    }

    private static String getMapParamValue(String paramId, String itemCode)
    {
        List list = (List)paramMap.get(paramId);
        for(Iterator iterator = list.iterator(); iterator.hasNext();)
        {
            StaticParam param = (StaticParam)iterator.next();
            if(param.getItemCode().equals(itemCode))
                return param.getItemValue();
        }

        return null;
    }

    private static String getMapParamCode(String paramId, String itemValue)
    {
        List list = (List)paramMap.get(paramId);
        for(Iterator iterator = list.iterator(); iterator.hasNext();)
        {
            StaticParam param = (StaticParam)iterator.next();
            if(param.getItemValue().equals(itemValue))
                return param.getItemCode();
        }

        return null;
    }

    public StaticParamDao getStaticParamDao()
    {
        return staticParamDao;
    }
    @Resource
    public void setStaticParamDao(StaticParamDao staticParamDao)
    {
        staticParamDao = staticParamDao;
    }

    public RedisTemplate getTemplete()
    {
        return templete;
    }
    @Resource
    public void setTemplete(RedisTemplate templete)
    {
        templete = templete;
    }
    
    
    public static StaticParamDao staticParamDao;
    public static RedisTemplate templete;
    public static Map paramMap = new ConcurrentHashMap();





}